package com.cy.service.impl;

<<<<<<< HEAD
import com.cy.dao.SysEmpDao;
=======
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.cy.mapper.SysEmpDao;
>>>>>>> 077350d86a1907fe0d7e568d7e4251032549d4f8
import com.cy.pojo.SysEmp;
import com.cy.service.SysEmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

<<<<<<< HEAD
=======
import java.util.ArrayList;
>>>>>>> 077350d86a1907fe0d7e568d7e4251032549d4f8
import java.util.List;

@Service
public class SysEmpServiceImpl implements SysEmpService {
    @Autowired
    private SysEmpDao sysEmpDao;
<<<<<<< HEAD
    public void doSaveEmp(SysEmp entity){
        sysEmpDao.insert(entity);
=======
    public int doSaveEmp(SysEmp entity){
        return sysEmpDao.insert(entity);
>>>>>>> 077350d86a1907fe0d7e568d7e4251032549d4f8
    }

    @Override
    public SysEmp doSelectEmpById(Integer id) {
        return sysEmpDao.selectById(id);
    }
<<<<<<< HEAD
=======

    @Override
    public List<SysEmp> doSelectEmp(SysEmp entity) {
        QueryWrapper queryWrapper=new QueryWrapper(null);
        return sysEmpDao.selectList(queryWrapper);
    }

    @Override
    public int doDeleteEmpByIds(List<Integer> ids) {
        int rows=sysEmpDao.deleteBatchIds(ids);
        return rows;

    }

    @Override
    public int doUpdateEmp(SysEmp entity) {
       int rows= sysEmpDao.updateById(entity);
        return rows;
    }
>>>>>>> 077350d86a1907fe0d7e568d7e4251032549d4f8
}
